<?php

	/**
	 * 发送数据报表给boss， dangerous！！！
	 */
	include_once dirname(dirname(__FILE__))."/include/common.inc.php";
	include_once dirname(dirname(__FILE__))."/report/function.report.php";
	include_once ROOT_PATH."/report/pChart.1.26e/pChart/pData.class";
	include_once ROOT_PATH."/report/pChart.1.26e/pChart/pChart.class";
	
	$global_site = "report";
	
	$yesterday = date("Y-m-d", time() - 60*60*24);
	$attach_list = array(ROOT_PATH."/report/images/".$yesterday.'_zhenai.png',
						ROOT_PATH."/report/images/".$yesterday.'_baihe.png',
						ROOT_PATH."/report/images/".$yesterday.'_ganji.png',
						ROOT_PATH."/report/images/".$yesterday.'_yuanlai.png',
						ROOT_PATH."/report/images/".$yesterday.'_youyuan.png',
						);
	$subject = '竞争对手注册信息监控 '.$yesterday;
	$content = makeReportContent($yesterday);
	$baihe = dataAna("baihe", $yesterday);
	$sql = "select * from baiheuser where date='".$yesterday."'";
	$result = $conn->result($sql);
	array_push($baihe[0], $result->is3g.'人/占比'.round(($result->is3g/$result->total)*100,2).'%',$result->app.'人/占比'.round(($result->app/$result->total)*100,2).'%');
	$header = array($yesterday,'男','女','有照片','无照片','3G注册用户','app注册用户');
	$body = createBody($header,$baihe)."<br >";
	$content = $body.$content;
	sendMailEx($subject, $content, $attach_list, 1); //dangerous!!!

?>
